home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.19990725-20000114 / 000264_news@columbia.edu _Fri Nov 5 16:59:52 1999.msg < prev    next >
Internet Message Format  |  2000-01-13  |  5KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id QAA28206
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 5 Nov 1999 16:59:52 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id QAA18856
  7.     for kermit.misc@watsun.cc.columbia.edu; Fri, 5 Nov 1999 16:44:19 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Re: UPS control on VMS, Kermit?
  11. Date: 5 Nov 1999 21:44:18 GMT
  12. Organization: Columbia University
  13. Message-ID: <7vvj3i$id6$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16. In article <7vvddp$hum@gap.cco.caltech.edu>,
  17.  <mathog@seqaxp.bio.caltech.edu> wrote:
  18. : Tripplite used to ship a program called PowerMon II with its Omnismart
  19. : UPS, but no longer does and no longer supports that software.  There was 
  20. : a CDROM that came from Compaq with our DS10, but it claims to support only
  21. : Exide UPS systems.  That said, near as I can tell, it is a variant of
  22. : Powermon II.
  23. : Anybody know of either a *supported* piece of UPS software or an 
  24. : implementation that already runs on OpenVMS?
  25. : I took a quick look at some of the Linux stuff to see what would be
  26. : involved in porting it.  As you might expect, both genpowerd and upsd are
  27. : based on ioctl() (blech!)  Unfortunately ioctl() is not something that we
  28. : can use on VMS to look at a serial line.  In fact, it's none too
  29. : portable on Unix either.
  30. : The bottom line on all of these programs is that they talk to a modem like
  31. : device on one of the serial ports.  Kermit will do that, I think, and
  32. : Kermit has scripts.  That raises the possibility that maybe it would be
  33. : possible to write a more portable implementation of a UPS monitor which
  34. : runs entirely within Kermit. Initially all I want to be able to do is:
  35. :  1.  monitor the UPS
  36. :  2.  start a shutdown when a power failure is detected
  37. :  3.  cancel the shutdown when the power is restored
  38. If all that would be dialog-driven, it's entirely possible with Kermit.
  39. It's also possible by monitoring certain modem signals.
  40.  
  41. : Eventually it would be nice to also be able to:
  42. :  4.  signal other systems to shut down as part of the final shutdown
  43. :      sequence, either over a serial line or the network.
  44. :      
  45. This would be more complicated, since it must involve cooperating processes
  46. on the other systems, but certainly possible.
  47.  
  48. : Any thoughts on this from more experienced kermit users?
  49. : If it can't be run entirely from within Kermit then how about a method,
  50. : any method, for reading the serial port control lines?
  51. : Apparently the UPS devices signal on those rather than through the data. 
  52. : Funny, in roughly 20 years with this OS I've never before had a need to
  53. : read the control signals on a serial line directly.
  54. Here is a brief session with C-Kermit 7.0:
  55.  
  56.   http://www.columbia.edu/kermit/ck70.html
  57.  
  58. that shows it can access the modem-control lines:
  59.  
  60. $ kermit
  61. C-Kermit 7.0.196 Beta.10+, 30 Oct 1999, for OpenVMS Alpha
  62.  Copyright (C) 1985, 1999,
  63.   Trustees of Columbia University in the City of New York.
  64. Default file-transfer mode is AUTOMATIC
  65. Type ? or HELP for help.
  66. DKA0:[FDC] C-Kermit>set line tta0
  67. DKA0:[FDC] C-Kermit>sho comm
  68.  
  69. Communications Parameters:
  70.  Line: _ALPHA2$TTA0:, speed: 9600, mode: local, modem: none
  71.  Parity: none, stop-bits: (default) (8N1)
  72.  Duplex: full, flow: xon/xoff, handshake: none
  73.  Carrier-watch: auto, close-on-disconnect: off
  74.  
  75.  Terminal bytesize: 7, escape character: 28 (^\)
  76.  
  77.  Carrier Detect      (CD):  Off
  78.  Dataset Ready       (DSR): Off
  79.  Clear To Send       (CTS): Off
  80.  Ring Indicator      (RI):  Off
  81.  Data Terminal Ready (DTR): On
  82.  Request To Send     (RTS): On
  83.  
  84. DKA0:[FDC] C-Kermit>
  85.  
  86. C-Kermit 7.0 is recommended; I'm not sure if this stuff works at all in
  87. earlier versions.  The command for monitoring modem signals is WAIT:
  88.  
  89.  
  90. DKA0:[FDC] C-Kermit>help wait
  91.  
  92. Syntax: WAIT { number-of-seconds, hh:mm:ss } [modem-signal(s)]
  93.  
  94. Examples:
  95.   wait 5 cd cts
  96.   wait 23:59:59 cd
  97.  
  98.   Waits up to the given number of seconds or the given time of day for all
  99.   the specified modem signals to appear on the serial communication device.
  100.   Sets FAILURE if the signals do not appear in the given time or interrupted
  101.   from the keyboard during the waiting period.  Also see HELP PAUSE.
  102.  
  103. Signals:
  104.   cd  = Carrier Detect;
  105.   dsr = Dataset Ready;
  106.   cts = Clear To Send;
  107.   ri  = Ring Indicate.
  108.  
  109. DKA0:[FDC] C-Kermit>exit
  110. $
  111.  
  112. For sample Kermit scripts (but none of them relating specifically to UPS
  113. control), see:
  114.  
  115.   http://www.columbia.edu/kermit/ckscripts.html
  116.  
  117. If you develop a script for this, feel free to contribute it to the C-Kermit
  118. script library.
  119.  
  120. - Frank